package com.yunlin.blecontroler;

import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.content.Context;

import java.util.concurrent.Callable;

/*
    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ 
       Author   :  lixiaodaoaaa
       Date     :  2018/7/4
       Time     :  17:20
    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
 */
public class ConnectThread implements Callable<BluetoothGatt>{
    
    
    private Context context;
    private BluetoothDevice bleDevice;
    private BluetoothGattCallback callback;
    
    public ConnectThread(Context context, BluetoothDevice bleDevice, BluetoothGattCallback callback){
        this.context=context;
        this.bleDevice=bleDevice;
        this.callback=callback;
    }
    
    
    @Override
    public BluetoothGatt call(){
        return bleDevice.connectGatt(context, false, callback);
        
        
    }
}
